import Blockly from 'blockly'

let codemaoTheme = Blockly.Theme.defineTheme('codemao', {
  base: Blockly.Themes.Zelos,
  blockStyles: {
    controller: {
      colourPrimary: '#68cdff',
      colourTertiary: '#5db8e5'
    },
    calculation: {
      colourPrimary: '#feae8a',
      colourTertiary: '#e49c7c'
    },
    function: {
      colourPrimary: '#f88767',
      colourTertiary: '#df795c'
    },
    utility: {
      colourPrimary: '#00afc3',
      colourTertiary: '#009daf'
    },
    variable: {
      colourPrimary: '#ffbb55',
      colourTertiary: '#e5a84c'
    },
    list: {
      colourPrimary: '#f9cc37',
      colourTertiary: '#e0b731'
    },
    time: {
      colourPrimary: '#f9cc37',
      colourTertiary: '#e0b731'
    },
    dictionary: {
      colourPrimary: '#a073ff',
      colourTertiary: '#9067e5'
    },
    color: {
      colourPrimary: '#2bc9a7',
      colourTertiary: '#19b693'
    },
    http: {
      colourPrimary: '#f9cc37',
      colourTertiary: '#e0b731'
    },
    sqlite: {
      colourPrimary: '#f9cc37',
      colourTertiary: '#e0b731'
    },
    dict: {
      colourPrimary: '#a073ff',
      colourTertiary: '#9067e5'
    },
    // 修改第44行附近的JSON分类名为data_encoding
    data_encoding: {
      colourPrimary: '#9c6bff',
      colourTertiary: '#8c60e5'
    },
    io: {
      colourPrimary: '#f9cc37',
      colourTertiary: '#e0b731'
    },
    base64: {
      colourPrimary: '#CAB8F9',
      colourTertiary: '#B8AEE9'
    },
    json: {
      colourPrimary: '#CAB8F9',
      colourTertiary: '#B8AEE9'
    },
    queue: {
      colourPrimary: '#6B8EFF',  // 改为更柔和的蓝色
      colourSecondary: '#5A7DEF',
      colourTertiary: '#4A6DDF'
    },
    threading: {
      colourPrimary: '#9C6BFF',
      colourSecondary: '#8C5BEF',
      colourTertiary: '#7C4BDF'
    },
    subprocess: {
      colourPrimary: '#FF8C6B',  // 新增subprocess积木的橙色配色
      colourSecondary: '#EF7C5B',
      colourTertiary: '#DF6C4B'
    },
    turtle: {
      colourPrimary: '#6BFF8C',  // 新增turtle积木的绿色配色
      colourSecondary: '#5BEF7C',
      colourTertiary: '#4BDF6C'
    }
  },
  categoryStyles: {
    controller: {
      colour: '#01adff'
    },
    calculation: {
      colour: '#f0aa8b'
    },
    function: {
      colour: '#f88767'
    },
    utility: {
      colour: '#5ab45b'
    },
    variable: {
      colour: '#ffbb55'
    },
    list: {
      colour: '#ff9c37'
    },
    dictionary: {
      colour: '#2bc9a7'
    },
    time: {
      colour: '#f9cc37'
    },
    color: {
      colour: '#2bc9a7'
    },
    http: {
      colour: '#f9cc37'
    },
    sqlite: {
      colour: '#f9cc37'
    },
    dict: {
      colour: '#a073ff'
    },
    io: {
      colour: '#CAB8F9'
    },
    data_encoding: {
      colour: '#9c6bff'
    },
    base64: {
      colour: '#CAB8F9'
    },
    json: {
      colour: '#CAB8F9'
    },
    // 添加threading分类样式
    threading: {
      colour: '#9C6BFF'
    },
    queue: {
      colour: '#6B8EFF'
    },
    subprocess: {
      colour: '#FF8C6B'  // 新增subprocess分类样式
    },
    turtle: {
      colour: '#6BFF8C'  // 新增turtle分类样式
    }
    
  }
})

export default codemaoTheme
